<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>XMP Toolkit SDK: AdobeXMPCommon::IMemoryAllocator_v1 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xmp_tagline_small.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XMP Toolkit SDK
   &#160;<span id="projectnumber">6.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classAdobeXMPCommon_1_1IMemoryAllocator__v1.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classAdobeXMPCommon_1_1IMemoryAllocator__v1-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AdobeXMPCommon::IMemoryAllocator_v1 Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Version1 of the interface that represents an interface to be implemented by client in case he is interested in controlling the memory allocation and deallocation on the heap.  
 <a href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="IMemoryAllocator_8h_source.html">IMemoryAllocator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2942e9d8f0d685ae6ebe58c18a11b999"><td class="memItemLeft" align="right" valign="top">virtual void *APICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a2942e9d8f0d685ae6ebe58c18a11b999">allocate</a> (<a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">sizet</a> size) <a class="el" href="XMPCommonDefines_8h.html#a5a929113d3d50bda3fb7135a5c8b24a2">__NOTHROW__</a>=0</td></tr>
<tr class="memdesc:a2942e9d8f0d685ae6ebe58c18a11b999"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by the library whenever it needs some space on the heap.  <a href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a2942e9d8f0d685ae6ebe58c18a11b999">More...</a><br /></td></tr>
<tr class="separator:a2942e9d8f0d685ae6ebe58c18a11b999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a607755ef64bf552482c4a330fcc79120"><td class="memItemLeft" align="right" valign="top">virtual void APICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a607755ef64bf552482c4a330fcc79120">deallocate</a> (void *ptr) <a class="el" href="XMPCommonDefines_8h.html#a5a929113d3d50bda3fb7135a5c8b24a2">__NOTHROW__</a>=0</td></tr>
<tr class="memdesc:a607755ef64bf552482c4a330fcc79120"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by the library whenever there is no further need for a previously allocated space on the heap.  <a href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a607755ef64bf552482c4a330fcc79120">More...</a><br /></td></tr>
<tr class="separator:a607755ef64bf552482c4a330fcc79120"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89ea55ddb2e5a544a93525b227b042f9"><td class="memItemLeft" align="right" valign="top">virtual void *APICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a89ea55ddb2e5a544a93525b227b042f9">reallocate</a> (void *ptr, <a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">sizet</a> size) <a class="el" href="XMPCommonDefines_8h.html#a5a929113d3d50bda3fb7135a5c8b24a2">__NOTHROW__</a>=0</td></tr>
<tr class="memdesc:a89ea55ddb2e5a544a93525b227b042f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by the library whenever it needs to expand or contract some space already allocated on the heap, preserving the contents.  <a href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a89ea55ddb2e5a544a93525b227b042f9">More...</a><br /></td></tr>
<tr class="separator:a89ea55ddb2e5a544a93525b227b042f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3557c223280972c7a4e0219d9d4181c3"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#a3557c223280972c7a4e0219d9d4181c3">~IMemoryAllocator_v1</a> ()</td></tr>
<tr class="separator:a3557c223280972c7a4e0219d9d4181c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aee52f392f1548bffc01b2be3fd9fab28"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html#aee52f392f1548bffc01b2be3fd9fab28">REQ_FRIEND_CLASS_DECLARATION</a> ()</td></tr>
<tr class="separator:aee52f392f1548bffc01b2be3fd9fab28"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Version1 of the interface that represents an interface to be implemented by client in case he is interested in controlling the memory allocation and deallocation on the heap. </p>
<p>In case client is interested in controlling the memory allocation and deallocation on the heap he can implement this interface and register the same with the #AdobeXMPCommon::IConfigurationManager. For every request of memory allocation or deallocation on the heap corresponding function will be called by the library. </p><dl class="section attention"><dt>Attention</dt><dd>Support for Multi threading is under clients hand. </dd></dl>

<p class="definition">Definition at line <a class="el" href="IMemoryAllocator_8h_source.html#l00029">29</a> of file <a class="el" href="IMemoryAllocator_8h_source.html">IMemoryAllocator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a3557c223280972c7a4e0219d9d4181c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3557c223280972c7a4e0219d9d4181c3">&#9670;&nbsp;</a></span>~IMemoryAllocator_v1()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual AdobeXMPCommon::IMemoryAllocator_v1::~IMemoryAllocator_v1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="IMemoryAllocator_8h_source.html#l00056">56</a> of file <a class="el" href="IMemoryAllocator_8h_source.html">IMemoryAllocator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;{}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2942e9d8f0d685ae6ebe58c18a11b999"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2942e9d8f0d685ae6ebe58c18a11b999">&#9670;&nbsp;</a></span>allocate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void* APICALL AdobeXMPCommon::IMemoryAllocator_v1::allocate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">sizet</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called by the library whenever it needs some space on the heap. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>A value of type #<a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">AdobeXMPCommon::sizet</a> indicating the number of bytes required by the library on the heap. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to memory location on the heap. </dd></dl>

</div>
</div>
<a id="a607755ef64bf552482c4a330fcc79120"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a607755ef64bf552482c4a330fcc79120">&#9670;&nbsp;</a></span>deallocate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void APICALL AdobeXMPCommon::IMemoryAllocator_v1::deallocate </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called by the library whenever there is no further need for a previously allocated space on the heap. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>A pointer to a memory location which is no longer needed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a89ea55ddb2e5a544a93525b227b042f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89ea55ddb2e5a544a93525b227b042f9">&#9670;&nbsp;</a></span>reallocate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void* APICALL AdobeXMPCommon::IMemoryAllocator_v1::reallocate </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">sizet</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called by the library whenever it needs to expand or contract some space already allocated on the heap, preserving the contents. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>A pointer to a memory location which was previously allocated on the heap. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>A value of type #<a class="el" href="namespaceAdobeXMPCommon.html#a1c85c2f558b495c3d41eabe692a96cf2">AdobeXMPCommon::sizet</a> indicating the new number of bytes required by the library on the heap. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to memory location on the heap which is of new size and previous contents are preserved. </dd></dl>

</div>
</div>
<a id="aee52f392f1548bffc01b2be3fd9fab28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee52f392f1548bffc01b2be3fd9fab28">&#9670;&nbsp;</a></span>REQ_FRIEND_CLASS_DECLARATION()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">AdobeXMPCommon::IMemoryAllocator_v1::REQ_FRIEND_CLASS_DECLARATION </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>public/include/XMPCommon/Interfaces/<a class="el" href="IMemoryAllocator_8h_source.html">IMemoryAllocator.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceAdobeXMPCommon.html">AdobeXMPCommon</a></li><li class="navelem"><a class="el" href="classAdobeXMPCommon_1_1IMemoryAllocator__v1.html">IMemoryAllocator_v1</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
